/*
* test1
*/
package com.pitop.repair.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

import com.pitop.repair.entity.RepairStaff;

/**
 * 维修账户 api请求熔断器
 *
 * @author test1
 */
@FeignClient(value = "pps-cloud-provider", fallback = RepairStaffFeignApiImpl.class)
public interface RepairStaffFeignApi {
    /**
     * 查询RepairStaff一个详情信息
     *
     * @param id
     * @param code 编码
     * @return RepairStaff
     */
    @GetMapping(value = "/repairStaff/load")
    RepairStaff load(@RequestParam("id") Long id, @RequestParam("code") String code);


    /**
     * 根据条件id查询RepairStaff一个详情信息
     *
     * @param id
     * @return RepairStaff
     */
    @GetMapping(value = "/repairStaff/load/id/{id}")
    RepairStaff loadById(@RequestParam("id") Long id);


    /**
     * 根据条件code查询RepairStaff一个详情信息
     *
     * @param code 编码
     * @return RepairStaff
     */
    @GetMapping(value = "/repairStaff/load/code/{code}")
    RepairStaff loadByCode(@RequestParam("code") String code);

    /**
     * 删除RepairStaff
     */
    @DeleteMapping("/repairStaff/delete")
    void delete(@RequestParam("id") Long id, @RequestParam("code") String code);


    /**
     * 查询RepairStaff信息集合
     *
     * @return 分页对象
     */
    @PostMapping(value = "/repairStaff/list")
    List<RepairStaff> list(@RequestBody RepairStaff repairStaff, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 查询RepairStaff信息集合
     *
     * @return 分页对象
     */
    @GetMapping(value = "/repairStaff/list/by")
    List<RepairStaff> listByPk(@RequestParam("id") Long id, @RequestParam("code") String code, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 统计RepairStaff信息数量根据主键
     *
     * @return 总条数
     */
    @GetMapping(value = "/repairStaff/count/by")
    Integer count(@RequestParam("id") Long id, @RequestParam("code") String code);

    /**
     * 统计RepairStaff信息数量
     *
     * @return 总条数
     */
    @PostMapping(value = "/repairStaff/count")
    Integer count(@RequestBody RepairStaff repairStaff);


    /**
     * 创建RepairStaff
     *
     * @return RepairStaff
     */
    @PostMapping("/repairStaff/build")
    RepairStaff build(@RequestBody RepairStaff repairStaff);


    /**
     * 修改RepairStaff
     *
     * @return RepairStaff
     */
    @PutMapping("/repairStaff/modify")
    RepairStaff modify(@RequestBody RepairStaff repairStaff);


}
